import 'dart:ui';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:rain_ui/theme/base/rain_base_theme.dart';
import 'package:rain_ui/theme/rain_splash_factory.dart';

/// 
/// rain_normal_theme
/// 范玉辉
/// 2022/2/25

class RainNormalTheme extends RainBaseTheme {

  @override
  Color get danger => const Color(0xFFFF3347);

  @override
  Color get dangerLight => const Color(0xFFFFD4D8);

  @override
  Color get dangerDark => const Color(0xFFD83931);

  @override
  Color get dangerBackground => const Color(0xFFFEF7F8);

  @override
  Color get primary => const Color(0xFFFFFFFF);

  @override
  MaterialColor get primarySwatch => MaterialColor(
    primary.value,
    <int, Color>{
      50: const Color(0xFFE0F8F6),
      100: const Color(0xFFB3EDEA),
      200: const Color(0xFF80E1DC),
      300: const Color(0xFF4DD4CD),
      400: const Color(0xFF26CBC3),
      500: primary,
      600: const Color(0xFF00BCB1),
      700: const Color(0xFF00B4A8),
      800: const Color(0xFF00ACA0),
      900: const Color(0xFF009F91),
    },
  );

  @override
  List<Color> get primaryGradientColors => const <Color>[Color(0xff00CCBE), Color(0xff00C2BF)];

  @override
  Color get shade50 => const Color(0xFFFCFCFC);

  @override
  Color get shade100 => const Color(0xFFF6F6F6);

  @override
  Color get shade200 => const Color(0xFFF3F3F3);

  @override
  Color get shade300 => const Color(0xFFE8E8E8);

  @override
  Color get shade400 => const Color(0xFFCCCCCC);

  @override
  Color get shade500 => const Color(0xFF999999);

  @override
  Color get shade600 => const Color(0xFF666666);

  @override
  Color get shade700 => const Color(0xFF333333);

  @override
  Color get shade800 => const Color(0xFF222222);

  @override
  Color get shade900 => const Color(0xFF111111);

  @override
  Color get success => const Color(0xFF0EC270);

  @override
  Color get successLight => const Color(0xFFBCF5D9);

  @override
  Color get successDark => const Color(0xFF5ABB3C);

  @override
  Color get successBackground => const Color(0xFFF5FCF9);

  @override
  Color get warning => const Color(0xFFFE9000);

  @override
  Color get warningLight => const Color(0xFFFFE8D1);

  @override
  Color get warningDark => const Color(0xFFFF9801);

  @override
  Color get warningBackground => const Color(0xFFFCF9F5);

  @override
  ThemeData get theme {
    return ThemeData(
      primaryColor: primary,
      primarySwatch: primarySwatch,
      scaffoldBackgroundColor: shade100,
      splashColor: Colors.transparent,
      //关闭按钮类水波纹
      highlightColor: Colors.transparent,
      //关闭按钮类水波纹
      splashFactory: RainSplashFactory(),
      //关闭水波纹
      accentColor: shade50,
      //修改列表水波纹颜色
      fontFamily: materialFontFamily(defaultTargetPlatform), // 设置字体样式
    );
  }

  String? materialFontFamily(TargetPlatform targetPlatform) {
    if (targetPlatform == TargetPlatform.iOS) {
      return 'PingFang SC';
    } else {
      return null;
    }
  }

  @override
  Color get price => danger;


}